In computing, transaction processing is a type of information handling in which operations are divided into individual, indivisible, units of work called transactions. Each transaction must succeed or fail as a complete unit and cannot remain in an intermediate state. Transaction processing is designed to maintain a computer system, such as a database, in a known, consistent state. This is maintained by the fact that any operations that are interdependent are carried out on the system, either all completing successfully or all being cancelled successfully. For example, a typical banking transaction that involves moving money from a customer's savings account to a customer's bank account is a single transaction to the bank, but it involves at least two separate operations in computing terms. These operations are the debiting of the savings account and the crediting of the bank account. It can be seen from this example that all of the operations in the transaction must either both succeed or both fail, so that there is never any inconsistency in the bank's database. Transaction processing is designed to provide this.
Transaction processing allows multiple individual operations to be linked together automatically as a single, indivisible transaction. The transaction processing system ensures that either all operations in a transaction are completed without error, or none of them are completed. If some of the operations are completed but errors occur when the others are attempted, the transaction processing system rolls back all of the operations of the transaction, including the successful ones, thereby erasing all traces of the transaction and restoring the system to its previous consistent, known state. If all operations of a transaction are completed successfully, the transaction is committed by the system, and all changes to the database are made permanent.
Transaction processing systems usually have diagnostic functions available, for the purpose of detecting the cause of errors within a system, which can often be performing many thousands of transactions per second. One type of diagnostic function is the use of “tracing,” which is the monitoring of a transaction as it is carried out within the transaction processing system, with data about the transaction being stored in a defined manner at a known location as the transaction is being performed. This allows an administrator to track the behavior of any specific transaction that fails, and assist in the detection of the actual problem that caused the transaction to fail.
To optimize the performance of the overall transaction processing system, production transactions systems are usually configured with minimal active tracing. When a problem occurs, this makes problem diagnosis very difficult, and usually requires a user to retry the transaction that specifically failed. This is both time consuming and error prone. In many cases, problems cannot be reproduced by the user as the system configuration will have changed since the original transaction was tried and failed, so that the problem will not reoccur. This does not, however, mean the problem has been solved, as later changes may cause the problem to recur.